<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>{$meta_title}-狂雨小说CMS</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <link rel="stylesheet" href="__ADMIN__/css/admin.css">
        <link rel="stylesheet" href="__ADMIN__/css/font.css">
    </head>
    <body>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div style="padding-bottom: 10px;">
                                <button class="layui-btn" type="button" onclick="admin_show('添加','{:url('add')}',800,770)"><i class="layui-icon layui-icon-add-1"></i> 添加</button>
                            </div>
                            <table class="layui-table">
                                <colgroup>
                                    <col width="80">
                                    <col>
                                    <col width="100">
                                    <col width="100">
                                    <col width="380">
                                </colgroup>
                                <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>栏目名</th>
                                        <th>类型</th>
                                        <th>状态</th>
                                        <th><div align="center">操作</div></th>
                                    </tr>
                                </thead>
                                <tbody>
                                    {notempty name="list"}
                                    {volist name="list" id="vo"}
                                    <tr cate-id='{$vo.id}' fid='{$vo.pid}'>
                                        <td>{$vo.id}</td>
                                        <td>{$vo.html|html_entity_decode}{eq name="vo.count" value="0"}<i class="layui-icon x-show" status='false'>&#xe625;</i>{/eq}{$vo.title}</td>
                                        <td>{$vo.type_text}</td>
                                        <td><input type="checkbox" name="status" value="{$vo.status}" lay-skin="switch" lay-text="正常|禁用" lay-filter="status" lay-url="{:url('status',['id'=>$vo['id']])}" {eq name="vo.status" value="1"}checked{/eq}></td>
                                        <td>
                                            <a onclick="admin_show('编辑','{:url('edit',['id'=>$vo['id']])}','800','770')" class="layui-btn layui-btn-normal layui-btn-xs" href="javascript:;"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                                            <a onclick="admin_show('移动','{:url('operate',['type'=>'move','from'=>$vo['id']])}')" class="layui-btn layui-btn-warm layui-btn-xs" href="javascript:;"><i class="iconfont">&#xe600;</i>移动</a>
                                            <a onclick="admin_show('合并','{:url('operate',['type'=>'merge','from'=>$vo['id']])}')" class="layui-btn layui-btn-warm layui-btn-xs" href="javascript:;"><i class="iconfont">&#xe6eb;</i>合并</a>
                                            <a class="layui-btn layui-btn-danger layui-btn-xs" onclick="admin_del(this,'{:url('del',['id'=>$vo['id']])}')"><i class="layui-icon layui-icon-delete"></i>删除</a>
                                            {eq name="vo.count" value="0"}<a onclick="admin_show('增加子栏目','{:url('add',['pid'=>$vo['id']])}',800,770)" class="layui-btn layui-btn-xs" href="javascript:;"><i class="layui-icon layui-icon-add-1"></i>增加子栏目</a>{/eq}
                                        </td>
                                    </tr>
                                    {/volist}
                                    {else/}
                                        <td colspan="4"> aOh! 暂时还没有内容! </td>
                                    {/notempty}
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="__STATIC__/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="__ADMIN__/lib/layui/layui.js"></script>
    <script type="text/javascript" src="__ADMIN__/js/admin.js"></script>
    </body>
</html>